﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Genuilder.Extensibility
{
	public class NullGenLogger : IGenLogger
	{
		class NullExtensionLogger : IExtensionLogger
		{
			public void Info(string message)
			{
			}

			public void Warn(string message)
			{
			}

			public void Error(string message)
			{
			}
		}
		class NullGenItemLogger : IGenItemLogger
		{
			#region IGenItemLogger Members

			public void Info(string message)
			{

			}

			public void Warn(string message)
			{

			}

			public void Error(string message)
			{

			}

			
			public void Warn(string message, int line, int column)
			{
				
			}

			public void Error(string message, int line, int column)
			{
				
			}

			#endregion
		}

		#region IGenLogger Members

		public IExtensionLogger CreateExtensionLogger(IExtension extension)
		{
			return new NullExtensionLogger();
		}



		public IGenItemLogger CreateGenItemLogger(GenItem genItem)
		{
			return new NullGenItemLogger();
		}

		#endregion
	}

	public interface IGenItemLogger
	{
		void Info(string message);
		void Warn(string message, int line, int column);
		void Warn(string message);
		void Error(string message, int line, int column);
		void Error(string message);
	}
	public interface IExtensionLogger
	{
		void Info(string message);
		void Warn(string message);
		void Error(string message);
	}
	public interface IGenLogger
	{
		IExtensionLogger CreateExtensionLogger(IExtension extension);
		IGenItemLogger CreateGenItemLogger(GenItem genItem);
	}
}
